﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyQuangCao
{
    public partial class frmQC_3 : Form
    {
        string fDate = "";
        string tDate = "";
        public frmQC_3()
        {
            InitializeComponent();
        }
        private DataSet ds = new DataSet();
        private void button1_Click(object sender, EventArgs e)
        {
            fDate = dtpkFDate.Value.ToShortDateString();
            tDate = dtpkToDate.Value.ToShortDateString();
            //string sql = "SET DATEFORMAT DMY select * from DangKyQuangCao where ngay_bat_dau >= '" + fDate + "'";
            string sql = "SET DATEFORMAT DMY select * from DangKyQuangCao where ngay_bat_dau between '" + fDate + "' and '" + tDate + "'";
            frmChinh.me.cn1.laydulieu(sql, frmChinh.me.sqlcon, ds, "DangKyQuangCao");
            dataGridView1.DataSource = ds;
            dataGridView1.DataMember = "DangKyQuangCao";
        }

        private void btnBC_Click(object sender, EventArgs e)
        {

        }
    }
}
